// 导入axios
import axios from 'axios'
// 创建实例
const request = axios.create({
  baseURL:"http://dida100.com:8888",
  timeout:5000
})
// 拦截请求与响应
request.interceptors.request.use(config=>{
  // 添加请求头
  config.headers["Authorization"] = "Bearer "+sessionStorage.getItem("token");
  return config;
})

// 导出
export default request;